#ifndef SCROLLLINE_H
#define SCROLLLINE_H

#include <QLineEdit>
#include <QWheelEvent>
#include <QContextMenuEvent>


class ScrollLine : public QLineEdit
{
    Q_OBJECT
public:
    ScrollLine();
    /*A more complete constructor.*/
    ScrollLine(const QList<QString>& list, const QString& text);
    ~ScrollLine();

    /*To be used with the empty constructor, or to reset the list.*/
    void setList(const QList<QString>& list);

    /*How the user interacts with this widget.*/
    void wheelEvent(QWheelEvent * event);
    void mousePressEvent(QMouseEvent * event);
   // void contextMenuEvent(QContextMenuEvent *event);

public slots:

   void setEmpty();

private:
    const QList<QString>* m_list;
    int m_index;

};

#endif // SCROLLLINE_H
